package com.zd.kids.DataBean;

import android.text.TextUtils;

import com.chad.library.adapter.base.entity.MultiItemEntity;

import java.util.ArrayList;
import java.util.List;

/**
 * @ClassName: com.zd.kids.DataBean
 * @Description:
 * @Author: hyy
 * @Date: 2020/6/26
 * @Time: 10:38 PM
 */
public class BookUnitDataBean {

    /**
     * category_name : 自我與情感
     * assess_status : false
     * result : [{"id":1,"title":"認識自己","titleimage":null,"percent":50},{"id":2,"title":"我們的身體","titleimage":null,"percent":25},{"id":3,"title":"豐富的情緒","titleimage":null,"percent":0},{"id":4,"title":"興趣和需要","titleimage":null,"percent":0}]
     */

    private String assess_state;
    private String category_name;
    private boolean assess_status;
    private boolean assess_open;
    private List<ResultBean> result;

    public String getCategory_name() {
        if (!TextUtils.isEmpty(category_name)) {
            return category_name;
        }

        return "";
    }


    public String getAssess_state() {
        return assess_state == null ? "" : assess_state;
    }

    public void setAssess_state(String assess_state) {
        this.assess_state = assess_state;
    }

    public boolean isAssess_open() {
        return assess_open;
    }

    public void setAssess_open(boolean assess_open) {
        this.assess_open = assess_open;
    }

    public void setCategory_name(String category_name) {
        this.category_name = category_name;
    }

    public boolean isAssess_status() {
        return assess_status;
    }

    public void setAssess_status(boolean assess_status) {
        this.assess_status = assess_status;
    }

    public List<ResultBean> getResult() {
        if (result == null) {
            return new ArrayList<>();
        }
        return result;
    }

    public void setResult(List<ResultBean> result) {
        this.result = result;
    }

    public static class ResultBean implements MultiItemEntity {
        /**
         * id : 1
         * title : 認識自己
         * titleimage : null
         * percent : 50
         */

        private int id;
        private String number;
        private String title;
        private String titleimage;
        private int percent;


        /**
         * A 状态0 不能点击
         * B 状态1 点击后开始测试
         * C 状态2 可点击并已解锁下一个单元，点击后显示弹窗：“請聯絡GAPSK進行第二部分評估。”
         * D 状态3 可点击并已解锁下一个单元，点击后显示弹窗：“你已完成評估。”
         */
        private String assessState;

        private boolean isAiLock;

        private boolean isAiComplete;

        public boolean isAiComplete() {
            return isAiComplete;
        }

        /**
         * A 状态0 不能点击
         * B 状态1 点击后开始测试
         * C 状态2 可点击并已解锁下一个单元，点击后显示弹窗：“請聯絡GAPSK進行第二部分評估。”
         * D 状态3 可点击并已解锁下一个单元，点击后显示弹窗：“你已完成評估。”
         */
        public String getAssessState() {
            return assessState == null ? "" : assessState;
        }

        public void setAssessState(String assessState) {
            this.assessState = assessState;
        }

        public void setAiComplete(boolean aiComplete) {
            isAiComplete = aiComplete;
        }

        public boolean isAiLock() {
            return isAiLock;
        }

        public void setAiLock(boolean aiLock) {
            isAiLock = aiLock;
        }

        public String getId() {
            return id + "";
        }

        public String getNumber() {
            return number == null ? "" : number;
        }

        public void setNumber(String number) {
            this.number = number;
        }

        public void setId(int id) {
            this.id = id;
        }

        public String getTitle() {
            return title;
        }

        public void setTitle(String title) {
            this.title = title;
        }

        public String getTitleimage() {
            return titleimage;
        }

        public void setTitleimage(String titleimage) {
            this.titleimage = titleimage;
        }

        public int getPercent() {
            return percent;
        }

        public void setPercent(int percent) {
            this.percent = percent;
        }

        private int aiType;

        public int getAiType() {
            return aiType;
        }

        public void setAiType(int aiType) {
            this.aiType = aiType;
        }

        @Override
        public int getItemType() {
            return getAiType();
        }
    }
}
